Call success callback after checking connection#46
Call success callback after checking connection#46jeffcharles wants to merge 1 commit intohoerresb:masterfrom
Conversation
Prior to this change I've noticed that connect will call the success callback before the connection is actually established. This will ensure that the device is connected to the correct network and that the state of the connection is one where network calls can be made right after the success callback returns.
|
Thanks for the contribution. I typically do something very similar on the JavaScript side of this to make sure I'm connected to the network. I'm going to test your code and look it over. Might be simpler to do this way. Thanks. |
|
Would it be possible to get some sort of credit for my work in this PR? It appears it was copied and pasted into the codebase without attributing authorship. |
|
Yes, sorry. Credit is due where credit is due. I've already notice more things that need to updated. So, tonight when this gets updated I will merge your branch properly which should attribute you authorship. |
|
Thanks for this, I created a fork of WifiWizard (named WifiWizard2), and added this PR to it, along with credit for you in the changelog: |
I noticed when using this library that the success callback on the connect call would execute before the network was connected. These changes validate that the network is actually connected to the correct network before calling the success callback.
I'm also open to putting this new behaviour behind an optional options flag if you'd prefer to keep the old behaviour for current users.